package com.jay.lang.clazz;

public class CharacterCls {

	public static void main(String[] args) {
		char hi = 0xD843;
		char low = 0xDC30;
		System.out.println(Character.isSurrogatePair(hi, low));
		System.out.println(Integer.toHexString(Character.toCodePoint(hi, low)));

		// 需要几个char表示这个字符
		System.out.println(Character.charCount(0x20C30));
		char[] ca = Character.toChars(0x20C30);
		System.out.println(Integer.toHexString((int)ca[0]) + "|"
				+ Integer.toHexString((int)ca[1]));

		// 0x0967为梵文数字1
		System.out.println(Character.isDigit(0x0967));
		System.out.println(Character.digit(0x0967, 10));
		System.out.println(Character.isDigit('1'));
		System.out.println(Character.digit('1', 10));
		

		// 216C为罗马数字50
		System.out.println(Character.getNumericValue('\u216C'));

		System.out.println(Character.isDefined(0x0967));
		System.out.println(Character.isDefined('日'));
		
		System.out.println(Character.getDirectionality('日'));
		

		System.out.println(Character.isMirrored('日'));
		System.out.println(Character.isMirrored('('));

		System.out.println(Character.isTitleCase('\u01c8'));
		System.out.println(Character.toTitleCase('v'));
		System.out.println(Integer.toHexString((int)Character.toTitleCase('\u01c9')));
		
		System.out.println(Character.UnicodeBlock.of('\u01c8'));
		System.out.println(Character.UnicodeBlock.of('日'));
		System.out.println(Character.UnicodeBlock.of(0x0967));
	}
}
